﻿using System;

namespace _06继承与多态案例
{
    class Program
    {
        static void Main(string[] args)
        {
            string key = "";
            Pistol gun = new Pistol("M1911", 12, 12, 0.5f,400);
            MachineGun mgun = new MachineGun("M2", 36, 36, 0.1f, 300f);
            while(!key.Equals("Q"))
            {
                Console.WriteLine("按下F键，开火");
                key = Console.ReadLine();
                if(key.Equals("F")||key.Equals("f"))
                {
                    mgun.Fire();
                }
                gun.PrintWeaponStatus();
            }
            //Console.WriteLine("Hello World!");
        }
    }
}
